﻿@{
    ViewBag.Title = "assessList";
}

<link rel="stylesheet" type="text/css" href="~/Easy-UI/easyui/1.3.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/wu.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/icon.css" />
<script type="text/javascript" src="~/Easy-UI/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>


<a href="#" onclick="start()" class="easyui-linkbutton" plain="true" style="background:#ccc;width:70px;height:24px;text-align:center;color:#ffffff;">评估</a>


<select>
    <option>请选择...</option>
</select>
<select>
    <option>请选择...</option>
</select>
<input type="button" id="btncx" value="搜索" onclick="cx()" />
<table id="tt" class="easyui-datagrid" style="height:auto;">
    <thead>
        <tr>
            <th checkbox="true"></th>
            <th field="name1" width="90">项目号</th>
            <th field="name2" width="120">所属部门</th>
            <th field="name3" width="50">勘察人</th>
            <th field="name4" width="140">勘察开始时间</th>
            <th field="name5" width="140">勘察结束时间</th>
            <th field="name5" width="140">登记日期</th>
            <th field="name5" width="140">建议评估单价（元）</th>
            <th field="name5" width="140">项目状态</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var a in Model)
        {
            <tr>
                <td>@a.basic_id</td>
                <td>@a.projectNumber</td>
                <td>@a.department_Name</td>
                <td>@a.surveyName</td>
                <td>@a.survey_StartTime</td>
                <td>@a.survey_EndTime</td>
                <td>@a.basic_CreateTime</td>
                <td>@a.basic_UnitPrice</td>
                @if (a.basic_State == 3)
                {
                    <td>待评估</td>
                }
                @if (a.basic_State == 4)
                {
                    <td>评估进行中</td>
                }
                @if (a.basic_State == 5)
                {
                    <td>已评估/待初审</td>
                }
            </tr>
        }
    </tbody>
</table>

<div id="pp" class="easyui-pagination" style="background:#efefef;border:1px solid #ccc;width:510px;"
     data-options="total:2000,pageSize:10">
</div>

<script>
    //区位状况勘察
    function start() {
        var checked = "";
        $(":checkbox:checked").each(function () {
            checked += $(":checkbox:checked").val() + ',';
        })
        checked = checked.substr(0, checked.length - 1);
        if (checked.length != 1) {
            alert("请选择一个项目进行評估!");
        }
        else {
            var id = $(":checkbox:checked").parent().parent().parent().children().eq(1).children().html();
            parent.addTab("区位状况評估", "/House/assessAdd?id=" + id, "icon-chart-organisation", true);
        }
    }
</script>